<?php
/**
 * Created by PhpStorm.
 * User: UEWARE
 * Date: 2019-7-10
 * Time: 16:34:48
 */
namespace App\Factory;

use EasyWeChat\Factory as WeChat;use EasyWeChat\Factory;

class MiniProgram
{
    public static function app()
    {
        $config = [
            'app_id' => config('wechat.miniProgram.app_id'),
            'secret' => config('wechat.miniProgram.secret'),
            // 下面为可选项
            // 指定 API 调用返回结果的类型：array(default)/collection/object/raw/自定义类名
            'response_type' => 'array'
        ];

        $miniProgram = WeChat::miniProgram($config);

        return $miniProgram;
    }
}